/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package jp.co.irep.juten.controller;

import java.io.Serializable;
import java.util.List;
import javax.inject.Inject;
import javax.inject.Named;
import jp.co.irep.juten.entity.Maker;
import jp.co.irep.juten.facade.MakerFacade;
import jp.co.irep.juten.view.MakerViewBean;

/**
 *
 * @author binh_dinh
 */
@Named
public class MakerControllerBean implements Serializable {

    @Inject
    MakerFacade makerFacade;
    @Inject
    MakerViewBean makerViewBean;

    /**
     * すぺてのメーカを取得
     */
    public void getItems() {
        List<Maker> makerList = getMakerFacade().findAll();
        getMakerViewBean().setMakerList(makerList);
    }

    public MakerFacade getMakerFacade() {
        return makerFacade;
    }

    public void setMakerFacade(MakerFacade makerFacade) {
        this.makerFacade = makerFacade;
    }

    public MakerViewBean getMakerViewBean() {
        return makerViewBean;
    }

    public void setMakerViewBean(MakerViewBean makerViewBean) {
        this.makerViewBean = makerViewBean;
    }
}
